package com.aaa.china.hander;

public abstract class AbstractChainHandler<T> {

    public AbstractChainHandler next;

    public abstract Boolean isSuccess(T chinaParam);
    public AbstractChainHandler setNext(AbstractChainHandler abstractHandler){
      return this.next = abstractHandler;
    }
    public void isSetNext(T chinaParam){
       if (isSuccess(chinaParam)){
           if (this.next != null){
               this.next.isSetNext(chinaParam);
           }
       }
    }
}
